﻿using HtmlAgilityPack;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace wenku8.Parser
{
    public class NovelTextParser
    {
        // 从HTML源码中解析出小说内容
        public static string GetNovelText(string htmlPage)
        {
            var htmlDoc = new HtmlDocument();
            htmlDoc.LoadHtml(htmlPage);
            var contentNode = htmlDoc.GetElementbyId("content");
            return contentNode.InnerText.Replace("&nbsp;", "  ");
        }
    }
}
